package com.atguigu.rabbit.consumer.listener;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class ConsumerTopic02Listener {

    @RabbitListener(queues = "topic_queue_02")
    public void a(Channel channel, Message message,String str){
        System.out.println("=================主题模式02==============");
        byte[] body = message.getBody();
        String msg = new String(body);
        System.out.println(str+"  "+msg);
        System.out.println("=================主题模式02==============");

    }

}
